<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>库存盘点预警管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<div class="icon-buttons">
		<input type="button" class="leave-clean-session" data-inline="true" data-icon="back" data-iconpos="notext" value="返回"/>
	</div>
	<form:form id="searchForm" modelAttribute="storeInventoryAlert" action="${ctx}/inventory/storeInventoryAlert/check" method="post">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
	</form:form>
	<tags:message content="${message}"/>
	<table id="contentTable" data-role="table" class="ui-responsive table-stroke">
		<thead><tr><th>产品渠道</th><th>产品名称</th><th>零售价</th><th>当前数量</th><th>预警数量</th><th>7天销量</th></tr></thead>
		<tbody>
		<c:forEach items="${page.list}" var="msg">
			<tr>
				<td>
					${fns:getDictLabel(msg.storeInventoryAlert.storeProduct.product_type, "product_type", "")}
				</td>
				<c:if test="${msg.storeInventoryAlert.storeProduct.product_type == 0}">
					<td>${msg.storeInventoryAlert.storeProduct.product.name}</td>
					<td>${msg.storeInventoryAlert.storeProduct.product.retail_price}</td>
				</c:if>
				<c:if test="${msg.storeInventoryAlert.storeProduct.product_type == 1}">
					<td>${msg.storeInventoryAlert.storeProduct.storeSelfProduct.name}</td>
					<td>${msg.storeInventoryAlert.storeProduct.storeSelfProduct.retail_price}</td>
				</c:if>
				<td>${msg.storeInventoryAlert.storeProduct.amount}</td>
				<td>${msg.storeInventoryAlert.alertAmount}</td>
				<td>${msg.saleNumber}</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>
